package br.foton.la.vayacondios;

import br.foton.la.vayacondios.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class LoginActivity extends Activity {
	private EditText usuario;
	private EditText senha;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.login);
		usuario = (EditText) findViewById(R.id.usuario);
		senha = (EditText) findViewById(R.id.senha);
	}
	
	public void entrarOnClick(View v){
		String user = usuario.getText().toString();
		String pass = senha.getText().toString();
		Log.v("Login",user+pass);
		if("usuario".equals(user) & "senha".equals(pass)){
			startActivity(new Intent(this,DashboardActivity.class));
		} else {
			Toast.makeText(this, getString(R.string.erroLogin), Toast.LENGTH_SHORT).show();
		}
	}

}
